package com.hz.ruoyiequipment.warning.domain;

import java.util.List;
import java.util.Map;

public class CanalMessage {
    private List<Map<String, Object>> data; // 变更后的数据
    private String database;              // 数据库名
    private long es;                       // 事件时间
    private long id;                       // 事件 ID
    private boolean isDdl;                 // 是否是 DDL 操作
    private Map<String, String> mysqlType;  // MySQL 字段类型
    private List<Map<String, Object>> old;  // 变更前的数据
    private List<String> pkNames;          // 主键字段名
    private String sql;                    // SQL 语句
    private Map<String, Integer> sqlType;  // SQL 字段类型
    private String table;                  // 表名
    private long ts;                       // 时间戳
    private String type;                   // 变更类型（INSERT/UPDATE/DELETE）

    // Getters and Setters
    public List<Map<String, Object>> getData() {
        return data;
    }

    public void setData(List<Map<String, Object>> data) {
        this.data = data;
    }

    public String getDatabase() {
        return database;
    }

    public void setDatabase(String database) {
        this.database = database;
    }

    public long getEs() {
        return es;
    }

    public void setEs(long es) {
        this.es = es;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public boolean isDdl() {
        return isDdl;
    }

    public void setDdl(boolean ddl) {
        isDdl = ddl;
    }

    public Map<String, String> getMysqlType() {
        return mysqlType;
    }

    public void setMysqlType(Map<String, String> mysqlType) {
        this.mysqlType = mysqlType;
    }

    public List<Map<String, Object>> getOld() {
        return old;
    }

    public void setOld(List<Map<String, Object>> old) {
        this.old = old;
    }

    public List<String> getPkNames() {
        return pkNames;
    }

    public void setPkNames(List<String> pkNames) {
        this.pkNames = pkNames;
    }

    public String getSql() {
        return sql;
    }

    public void setSql(String sql) {
        this.sql = sql;
    }

    public Map<String, Integer> getSqlType() {
        return sqlType;
    }

    public void setSqlType(Map<String, Integer> sqlType) {
        this.sqlType = sqlType;
    }

    public String getTable() {
        return table;
    }

    public void setTable(String table) {
        this.table = table;
    }

    public long getTs() {
        return ts;
    }

    public void setTs(long ts) {
        this.ts = ts;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}